.class public Llt/farmis/libraries/bitflags/BitFlagSet;
.super Ljava/lang/Object;
.source "BitFlagSet.java"

# interfaces
.implements Llt/farmis/libraries/bitflags/BitFlags;
.implements Ljava/io/Serializable;
.implements Ljava/lang/Cloneable;


# instance fields
.field private mWrappedBitSet:Llt/farmis/libraries/bitflags/compatibility/android/BitSet;


# direct methods
.method public constructor <init>()V
    .locals 1

    .line 46
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 47
    new-instance v0, Llt/farmis/libraries/bitflags/compatibility/android/BitSet;

    invoke-direct {v0}, Llt/farmis/libraries/bitflags/compatibility/android/BitSet;-><init>()V

    iput-object v0, p0, Llt/farmis/libraries/bitflags/BitFlagSet;->mWrappedBitSet:Llt/farmis/libraries/bitflags/compatibility/android/BitSet;

    return-void
.end method

.method public static createFrom([B)Llt/farmis/libraries/bitflags/BitFlags;
    .locals 1

    .line 110
    invoke-static {}, Llt/farmis/libraries/bitflags/BitFlagSet;->createNew()Llt/farmis/libraries/bitflags/BitFlags;

    move-result-object v0

    invoke-interface {v0, p0}, Llt/farmis/libraries/bitflags/BitFlags;->populate([B)Llt/farmis/libraries/bitflags/BitFlags;

    return-object v0
.end method

.method public static createNew()Llt/farmis/libraries/bitflags/BitFlags;
    .locals 1

    .line 81
    new-instance v0, Llt/farmis/libraries/bitflags/BitFlagSet;

    invoke-direct {v0}, Llt/farmis/libraries/bitflags/BitFlagSet;-><init>()V

    return-object v0
.end method


# virtual methods
.method public varargs areEitherSet([I)Z
    .locals 5

    .line 175
    array-length v0, p1

    const/4 v1, 0x0

    const/4 v2, 0x0

    :goto_0
    if-ge v2, v0, :cond_1

    aget v3, p1, v2

    .line 176
    iget-object v4, p0, Llt/farmis/libraries/bitflags/BitFlagSet;->mWrappedBitSet:Llt/farmis/libraries/bitflags/compatibility/android/BitSet;

    invoke-virtual {v4, v3}, Llt/farmis/libraries/bitflags/compatibility/android/BitSet;->get(I)Z

    move-result v3

    if-eqz v3, :cond_0

    const/4 p1, 0x1

    return p1

    :cond_0
    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    :cond_1
    return v1
.end method

.method public varargs areSet([I)Z
    .locals 5

    .line 165
    array-length v0, p1

    const/4 v1, 0x0

    const/4 v2, 0x0

    :goto_0
    if-ge v2, v0, :cond_1

    aget v3, p1, v2

    .line 166
    iget-object v4, p0, Llt/farmis/libraries/bitflags/BitFlagSet;->mWrappedBitSet:Llt/farmis/libraries/bitflags/compatibility/android/BitSet;

    invoke-virtual {v4, v3}, Llt/farmis/libraries/bitflags/compatibility/android/BitSet;->get(I)Z

    move-result v3

    if-nez v3, :cond_0

    return v1

    :cond_0
    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    :cond_1
    const/4 p1, 0x1

    return p1
.end method

.method public clone()Ljava/lang/Object;
    .locals 2

    .line 307
    :try_start_0
    invoke-super {p0}, Ljava/lang/Object;->clone()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Llt/farmis/libraries/bitflags/BitFlagSet;

    .line 308
    iget-object v1, p0, Llt/farmis/libraries/bitflags/BitFlagSet;->mWrappedBitSet:Llt/farmis/libraries/bitflags/compatibility/android/BitSet;

    invoke-virtual {v1}, Llt/farmis/libraries/bitflags/compatibility/android/BitSet;->clone()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Llt/farmis/libraries/bitflags/compatibility/android/BitSet;

    iput-object v1, v0, Llt/farmis/libraries/bitflags/BitFlagSet;->mWrappedBitSet:Llt/farmis/libraries/bitflags/compatibility/android/BitSet;
    :try_end_0
    .catch Ljava/lang/CloneNotSupportedException; {:try_start_0 .. :try_end_0} :catch_0

    return-object v0

    :catch_0
    move-exception v0

    .line 311
    new-instance v1, Ljava/lang/AssertionError;

    invoke-direct {v1, v0}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V

    throw v1
.end method

.method public equals(Ljava/lang/Object;)Z
    .locals 1

    if-eqz p1, :cond_2

    .line 295
    instance-of v0, p1, Llt/farmis/libraries/bitflags/BitFlagSet;

    if-nez v0, :cond_0

    goto :goto_0

    :cond_0
    if-ne p0, p1, :cond_1

    const/4 p1, 0x1

    return p1

    .line 301
    :cond_1
    iget-object v0, p0, Llt/farmis/libraries/bitflags/BitFlagSet;->mWrappedBitSet:Llt/farmis/libraries/bitflags/compatibility/android/BitSet;

    invoke-virtual {v0, p1}, Llt/farmis/libraries/bitflags/compatibility/android/BitSet;->equals(Ljava/lang/Object;)Z

    move-result p1

    return p1

    :cond_2
    :goto_0
    const/4 p1, 0x0

    return p1
.end method

.method public hashCode()I
    .locals 1

    .line 290
    iget-object v0, p0, Llt/farmis/libraries/bitflags/BitFlagSet;->mWrappedBitSet:Llt/farmis/libraries/bitflags/compatibility/android/BitSet;

    invoke-virtual {v0}, Llt/farmis/libraries/bitflags/compatibility/android/BitSet;->hashCode()I

    move-result v0

    return v0
.end method

.method public isSet(I)Z
    .locals 1

    .line 133
    iget-object v0, p0, Llt/farmis/libraries/bitflags/BitFlagSet;->mWrappedBitSet:Llt/farmis/libraries/bitflags/compatibility/android/BitSet;

    invoke-virtual {v0, p1}, Llt/farmis/libraries/bitflags/compatibility/android/BitSet;->get(I)Z

    move-result p1

    return p1
.end method

.method public populate([B)Llt/farmis/libraries/bitflags/BitFlags;
    .locals 0

    .line 122
    invoke-static {p1}, Llt/farmis/libraries/bitflags/compatibility/android/BitSet;->valueOf([B)Llt/farmis/libraries/bitflags/compatibility/android/BitSet;

    move-result-object p1

    iput-object p1, p0, Llt/farmis/libraries/bitflags/BitFlagSet;->mWrappedBitSet:Llt/farmis/libraries/bitflags/compatibility/android/BitSet;

    return-object p0
.end method

.method public set(I)Llt/farmis/libraries/bitflags/BitFlags;
    .locals 1

    .line 138
    iget-object v0, p0, Llt/farmis/libraries/bitflags/BitFlagSet;->mWrappedBitSet:Llt/farmis/libraries/bitflags/compatibility/android/BitSet;

    invoke-virtual {v0, p1}, Llt/farmis/libraries/bitflags/compatibility/android/BitSet;->set(I)V

    return-object p0
.end method

.method public varargs set([I)Llt/farmis/libraries/bitflags/BitFlags;
    .locals 4

    .line 185
    array-length v0, p1

    const/4 v1, 0x0

    :goto_0
    if-ge v1, v0, :cond_0

    aget v2, p1, v1

    .line 186
    iget-object v3, p0, Llt/farmis/libraries/bitflags/BitFlagSet;->mWrappedBitSet:Llt/farmis/libraries/bitflags/compatibility/android/BitSet;

    invoke-virtual {v3, v2}, Llt/farmis/libraries/bitflags/compatibility/android/BitSet;->set(I)V

    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    :cond_0
    return-object p0
.end method

.method public toByteArray()[B
    .locals 1

    .line 259
    iget-object v0, p0, Llt/farmis/libraries/bitflags/BitFlagSet;->mWrappedBitSet:Llt/farmis/libraries/bitflags/compatibility/android/BitSet;

    invoke-virtual {v0}, Llt/farmis/libraries/bitflags/compatibility/android/BitSet;->toByteArray()[B

    move-result-object v0

    return-object v0
.end method

.method public toString()Ljava/lang/String;
    .locals 1

    .line 285
    iget-object v0, p0, Llt/farmis/libraries/bitflags/BitFlagSet;->mWrappedBitSet:Llt/farmis/libraries/bitflags/compatibility/android/BitSet;

    invoke-virtual {v0}, Llt/farmis/libraries/bitflags/compatibility/android/BitSet;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method
